package spi;

import java.util.Iterator;
import java.util.ServiceLoader;

/**
 * @auth cuiyutian1
 * @date 2021/8/10 10:18
 * @description:
 */
public class logTest {
    public static void main(String[] args) {
        ServiceLoader<log> serviceLoader = ServiceLoader.load(log.class);

        Iterator<log> iterator = serviceLoader.iterator();
        while (iterator.hasNext()){
            log log = iterator.next();
            log.info("java spi");
        }
    }
}

